<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>关联品牌ADD</title>

    <meta name="description" content="Dashboard">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--Basic Styles-->
    <link href="__admin__/style/bootstrap.css" rel="stylesheet">
    <link href="__admin__/style/font-awesome.css" rel="stylesheet">
    <link href="style/weather-icons.css" rel="stylesheet">

    <!--Beyond styles-->
    <link id="beyond-link" href="__admin__/style/beyond.css" rel="stylesheet" type="text/css">
    <link href="__admin__/style/demo.css" rel="stylesheet">
    <link href="__admin__/style/typicons.css" rel="stylesheet">
    <link href="__admin__/style/animate.css" rel="stylesheet">

</head>

<body>
<!-- 头部 -->
{include file='common/top'}
<!-- /头部 -->

<div class="main-container container-fluid">
    <div class="page-container">
        <!-- Page Sidebar左侧 -->
        {include file='common/left'}
        <!-- /Page Sidebar -->
        <!-- Page Content -->
        <div class="page-content">
            <!-- Page Breadcrumb -->
            <div class="page-breadcrumbs">
                <ul class="breadcrumb">
                    <li>
                        <a href="{:url('Index/index')}">系统</a>
                    </li>
                    <li>
                        <a href="{:url('categoryBrands/lst')}">关联品牌管理</a>
                    </li>
                    <li class="active">修改关联品牌</li>
                </ul>
            </div>
            <!-- /Page Breadcrumb -->

            <!-- Page Body -->
            <div class="page-body">

                <div class="row">
                    <div class="col-lg-12 col-sm-12 col-xs-12">
                        <div class="widget">
                            <div class="widget-header bordered-bottom bordered-blue">
                                <span class="widget-caption">新增关联品牌</span>
                            </div>
                            <div class="widget-body">
                                <div id="horizontal-form">
                                    <form class="form-horizontal" role="form" action="" method="post" enctype="multipart/form-data">
                                        <!--   enctype意思是可以上传图片-->
                                        <input type="hidden" name="id" value="{$categoryBrands.id}" >
                                        <div class="form-group">
                                            <label for="username" class="col-sm-2 control-label no-padding-right">关联的顶级栏目</label>
                                            <div class="col-sm-6">
                                                <select name="category_id">
                                                    <option value="">请选择</option>
                                                    {volist  name="cateRes" id="cate"}
                                                    <!--获取和传输顶级栏目-->
                                                    <option {if condition="$categoryBrands['category_id'] eq $cate['id']"} selected="selected" {/if} value="{$cate.id}">{$cate.cate_name}</option>
                                                    {/volist}
                                                </select>
                                            </div>
                                            <p class="help-block col-sm-4 red">* 必填</p>
                                        </div>

                                        <div class="form-group">
                                            <label for="username" class="col-sm-2 control-label no-padding-right">关联品牌 </label>
                                            <div class="col-sm-6">
                                                <div class="checkbox">
                                                    <?php
                                                        $arr = explode(',',$categoryBrands['brands_id']);
                                                    ?>
                                                    {volist name="brandRes" id="brand"}
                                                    <?php
                                                        if(in_array($brand['id'],$arr)){
                                                                $checked='checked="checked"';
                                                        }else{
                                                                $checked='';
                                                        }
                                                    ?>
                                                    <label style="margin-right: 15px;">
                                                        <input {$checked} name="brands_id[]" value="{$brand.id}" type="checkbox" class="colored-blue">
                                                        <span class="text">{$brand.brand_name}</span>
                                                    </label>
                                                    {/volist}
                                                </div>
                                            </div>
                                        </div>

                                        <div class="form-group">
                                            <label for="username" class="col-sm-2 control-label no-padding-right">推广图片</label>
                                            <div class="col-sm-6">
                                                <input name="pro_img" type="file">
                                                {if condition="$categoryBrands['pro_img']"}
                                                <img src="__UPADMIN__/{$categoryBrands.pro_img}" height="30px">
                                                {else /}
                                                暂无推广图
                                                {/if}
                                            </div>
                                        </div>


                                        <div class="form-group">
                                            <label for="username" class="col-sm-2  control-label no-padding-right">推广地址</label>
                                            <div class="col-sm-6">
                                                <input class="form-control" placeholder="" value="{$categoryBrands.pro_url}" name="pro_url" type="text">
                                            </div>
                                        </div>



                                        <div class="form-group">
                                            <div class="col-sm-offset-2 col-sm-10">
                                                <button type="submit" class="btn btn-default">保存信息</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

            </div>
            <!-- /Page Body -->
        </div>
        <!-- /Page Content -->
    </div>
</div>

<!--Basic Scripts-->
<script src="__admin__/style/jquery_002.js"></script>
<script src="__admin__/style/bootstrap.js"></script>
<script src="__admin__/style/jquery.js"></script>
<!--Beyond Scripts-->
<script src="__admin__/style/beyond.js"></script>



</body>

</html>